Python Maze Solver with OpenCV

by: supiri, 7 years ago

Last edited: 7 years ago

I recently followed the OpenCV tutorial Series and I got a idea to build a maze solving robot with raspberry pi 3 and opencv. with that in my mind i google about that and i found a maze solving algorithm, but it was written in python 2.7 (my guess) https://github.com/raincrash/image_processing/blob/master/maze_solver/maze_solver.py

while running following line gave a valueerror turns out they add another return value to opencv
contours, hierarchy = cv2.findContours(thresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) 


then I change the code to
_, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) 

then it wont gave error but it don't solve the maze

I ran this code in pc with python - 2.7.9 in that it solve the maze propley.

any help will be much thankful



You must be logged in to post. Please login or register an account.